-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve push notification dependency loop #14702
Resolve push notification dependency loop #14702
Conversation
// When the user logged out and then logged in with a different account | ||
// while the app is still in background, we must resubscribe to the report | ||
// push notification in order to render the report click behaviour correctly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I attempted to simplify this comment here
48e47db
to
465282a
Compare
@@ -2,6 +2,7 @@ import NotificationType from './NotificationType'; | |||
|
|||
// Push notifications are only supported on mobile, so we'll just noop here | |||
export default { | |||
init: () => {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that this is actually called outside of the module, I think it makes sense to export it from the non-native file. But I'm not 100% sure it's necessary
I'm wasting a lot of time here, going to make this a contributor issue |
Reopening as a contributor pointed out that this PR should work. I rebuild a release build, and it does in fact work. |
Tested all platforms except iOS. Will try a full-release build tomorrow then open it up for review. |
@0xmiroslav @alex-mechler One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosMobile Web - ChromeMobile Web - SafariiOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good to me and verified Tests step working well on web/desktop/android.
NOTE: #15104 is not merged into this PR so ##
fix in android is not applied here
I am not able to test on iOS dev build since I don't have provisioning profile. But I will confirm once staging build is uploaded to Testflight.
🎯 @0xmiroslav, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #15168. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
🚀 Deployed to staging by https://github.com/alex-mechler in version: 1.2.73-0 🚀
|
Verified on staging. Signed out and into another account 👍 |
🚀 Deployed to production by https://github.com/francoisl in version: 1.2.73-1 🚀
|
1 similar comment
🚀 Deployed to production by https://github.com/francoisl in version: 1.2.73-1 🚀
|
Details
A new developer warning message was introduced by #14588. It is not a regression or bug, but should be fixed. This is due to two separate files that import one another. I simply refactored these files and function calls to prevent this.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/259190
Tests
Testing notifications is a bit tricky, here is how I tested each supported platform:
http://127.0.0.1:8080/
URLnpm run desktop-build-staging
, then located the app build under 'desktop-build/mac/'Confirm users are re-registered for notifications when signing out
Notifications are notoriously tricky to test. I used staging for Desktop, dev for web, and physical device release builds for iOS and Android
Other
Offline tests
Confirm users are re-registered for notifications when signing out
This only works on staging/prod builds
QA Steps
The above tests should be run. This should be simpler now that you have testable staging releases. Let me know if you run into any issues!
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.Screenshots/Videos
Mobile Web - Chrome
N/A
Mobile Web - Safari
N/A
Desktop
iOS
Android